let Main = () => import("@/views/Main.vue")

export default [
    // 首页
    {
        path: 'dashboard',
        name: "Dashboard",
        component: () => import("@/views/Dashboard.vue"),
        meta: {
            title: "home",          // 名称
            icon: "icon-shouye"     // 阿里矢量图
        },
    },

    // ===营运管理===
    {
        path: "operations",
        name: "Operations",
        component: Main,
        meta: {
            title: "operate.operatemanage",
            icon: "icon-zhuxingtu"
        },
        children: [
            // 订单管理
            { path: 'order', name: "Order", component: () => import("@/views/operations/Order.vue"), meta: { title: "operate.ordermanage", } },
            // 评论管理
            { path: 'comment', name: "Comment", component: () => import("@/views/operations/Comment.vue"), meta: { title: "operate.commentmanage", } },
            // 运费管理
            { path: 'freight', name: "Freight", component: () => import("@/views/operations/Freight.vue"), meta: { title: "operate.freightmanage", } },
        ]
    },
    // ===商品管理===
    {
        path: "cmmodity",
        name: "Cmmodity",
        meta: {
            title: "product.commoditymanage",
            icon: "icon-gouwuche"
        },
        component: Main,
        children: [
            // 商品列表
            { path: 'commodi', name: "Commodi", component: () => import("@/views/cmmodity/Commodi.vue"), meta: { title: "product.productlist", },},
            // 团购商品
            { path: 'grouppurchase', name: "GroupPurchase", component: () => import("@/views/cmmodity/GroupPurchase.vue"), meta: { title: "product.grouppurchase"} },
            // 类目管理
            { path: 'category', name: "Category", component: () => import("@/views/cmmodity/Category.vue"), meta: { title: "product.gategorymanage" }},
            // 商品列表添加
            {path:'addcommodi',name:'AddCommodi',component:()=>import("@/views/children/cmmoditychildpage/AddCmmodiy.vue"), meta: { title: "addcmmodi",keepAlive:true }},
            // 商品列表编辑
            {path:':id',name:'EditCommodi',component:()=>import("@/views/children/cmmoditychildpage/EditCmmodity.vue"), meta: { title: "editcmmodi",keepAlive:true }},
        ]
    },

    // ===推广管理===
    {
        path: "marketing",
        name: "Marketing",
        meta: {
            title: "promotion.marketingmanage",
            icon: "icon-tianchongxing-"
        },
        component: Main,
        children: [
            // 广告管理
            { path: 'advertis', name: "Advertis", component: () => import("@/views/marketing/Advertis.vue"), meta: { title: "promotion.promotionmanage", } },
            // 应用管理
            { path: 'use', name: "Use", component: () => import("@/views/marketing/Use.vue"), meta: { title: "promotion.advertisingmanage", } },
            // 优惠券管理
            { path: 'coupon', name: "Coupon", component: () => import("@/views/marketing/Coupon.vue"), meta: { title: "promotion.couponmanage", } },
        ]
    },

    // ===用户管理===
    {
        path: "user",
        name: "User",
        meta: {
            title: "user.usermanage",
            icon: "icon-user"
        },
        component: Main,
        children: [
            // 会员管理
            { path: 'vipuser', name: "VipUser", component: () => import("@/views/user/VipUser.vue"), meta: { title: "user.membermanage", } },
            // 地址管理
            { path: 'location', name: "Location", component: () => import("@/views/user/Location.vue"), meta: { title: "user.addressmanage", } },
        ]
    },

    // ===系统管理===
    {
        path: "system",
        name: "System",
        meta: {
            title: "system.systemmanage",
            icon: "icon-xitong"
        },
        component: Main,
        children: [
            // 系统配置
            { path: 'systemLayout', name: "SystemLayout", component: () => import("@/views/system/SystemLayout.vue"), meta: { title: "system.systemconfig", } },
            // 管理员
            { path: 'admin', name: "Admin", component: () => import("@/views/system/Admin.vue"), meta: { title: "system.administrators", } },
            // 操作日志
            { path: 'operation', name: "Operation", component: () => import("@/views/system/Operation.vue"), meta: { title: "system.operationlog", } },
            // 角色管理
            { path: 'role', name: "Role", component: () => import("@/views/system/Role.vue"), meta: { title: "system.rolemanage", } },
        ]
    },
]